program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  arr=array of integer;
var
  f, r, n, k, i, j, a, b, x: integer;
  mass: array of arr;
begin
  x:=0;
  readln(f, r);
  readln(n, k);
  setlength(mass, f);
  for i:=0 to f-1 do
    setlength(mass[i], r);
  for i:=0 to f-1 do
    for j:=0 to r-1 do
      mass[i, j]:=0;
  for i:=0 to n-1 do
  begin
    readln(a, b);
    mass[a-1, b-1]:=mass[a-1, b-1]+1;
  end;

  for i:=0 to f-1 do
    for j:=0 to r-1 do
      if (mass[i, j]>k) then
        x:=x+1;
  writeln(x);
  readln;
end.
 